// pages/2411Ayiliao-pages/simple-test.js
Page({
	data: {
		clickCount: 0,
		lastClick: ''
	},

	clickKey(e) {
		const key = e.currentTarget.dataset.key
		console.log('点击了:', key)
		this.setData({
			clickCount: this.data.clickCount + 1,
			lastClick: key
		})
		
		// 显示提示
		wx.showToast({
			title: `点击了 ${key}`,
			icon: 'none',
			duration: 1000
		})
	},

	testClick() {
		console.log('测试按钮被点击')
		wx.showToast({
			title: '测试按钮正常',
			icon: 'success'
		})
	},

	resetCount() {
		this.setData({
			clickCount: 0,
			lastClick: ''
		})
	}
}) 